package org.september.pisces.operation.enums;

import org.september.pisces.settings.api.IPiscecSystemSettting;

public enum OperationSettingEnum implements IPiscecSystemSettting {

    数据库备份周期("其他配置", "backup_time_interval", "30|2025-01-01", "数据库备份周期", "间隔（天）|上次备份时间", 11),
    数据库备份路径("其他配置", "backup_file_path", "d:/dddz", "数据库备份路径", "数据库备份路径", 11);

    private String group;
    private String key; //状态名称
    private String value;
    private String label;
    private String remark;
    private int sort;

    OperationSettingEnum(String group, String key, String value, String label, String remark, int sort) {
        this.group = group;
        this.key = key;
        this.value = value;
        this.label = this.name();
        this.remark = remark;
        this.sort = sort;
    }


    public static OperationSettingEnum getByKey(String key) {
        for (OperationSettingEnum statusEnum : OperationSettingEnum.values()) {
            if (statusEnum.key.equals(key)) {
                return statusEnum;
            }
        }
        return null;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public int getSort() {
        return sort;
    }


    public void setSort(int sort) {
        this.sort = sort;
    }
}
